This invention relates to a virtual machine, and more particularly, to a method of booting a virtual machine that uses a plurality of access means to boot the same boot device.
In recent semiconductor manufacture, the advance in process rules have shifted the method of improving CPU performance from improving operating frequency to increasing the number of CPU cores mounted on a single LSI chip. Packaging that packs a plurality of or many CPU cores in a physical computer has thus become common. Server virtualization technology is one way to make full use of a plurality of or many CPU cores mounted on a physical computer. Server virtualization software (a hypervisor) generates a plurality of virtual machines on a single physical computer. With a plurality of virtual machines running on one physical computer, the physical computer is improved in CPU utilization ratio.
A hypervisor partitions a main memory mounted on a physical computer into a plurality of partitions to assign each partition as the main memory of one of virtual machines, and also assigns CPU cores mounted on the physical computer to the respective virtual machines in a dedicated manner or in a time-sharing manner. This is free of swap-out, unlike virtual storage, and the access performance level of a virtual machine accessing the main memory is therefore equivalent to that of a physical computer. The processing overhead of a hypervisor is small, which makes a virtual machine's performance close to a physical computer's performance with regard to CPU and main memory.
There is a great gap in IO adapter performance between a virtual machine and a physical computer. Because of restrictions in packaging space, only a limited number of IO adapters can be mounted on a physical computer. A single IO adapter is accordingly shared among a plurality of virtual machines. The hypervisor allows virtual machines to share an IO adapter by providing the virtual machines with virtual IO adapters, which emulate an IO adapter. A problem is that the IO performance of a virtual machine is impaired compared to the IO performance of a physical computer by overhead by the emulation.
To solve this problem, the PCI-SIG has set forth a standard called Single Root I/O Virtualization (SR-IOV). SR-IOV is a system of providing the main part of IO adapter sharing in hardware. In SR-IOV, the hypervisor handles only infrequent processing such as hardware initialization, which gives a virtual machine high IO performance. As a technology that uses IOV, the basic processing operation of a hypervisor is disclosed in US 2009/0133016. Known specifications of SR-IOV by PCI-SIG, “Single Root I/O Virtualization and Sharing Specification Revision 1.1”, 2009.
In SR-IOV, an IO adapter and a virtual IO adapter are called a physical function (PF) and a virtual function (VF), respectively. In order to reduce the LSI packaging area, VFs are packaged differently from the packaging method of PFs. Firstly, a VF is not available for use until the VF Enable bit in the SR-IOV Control field of a PF's SR-IOV Extended Capabilities is set. Secondly, the number of registers available for use differs between a PF and a VF and, even with the same register, the behavior regarding read and write may vary between a PF and a VF in some cases. Because of these differences, using a PF and a VF together requires a device driver dedicated to the PF and a device driver dedicated to the VF. After the PF device driver initializes the IO adapter, the VF Enable bit is set to enable the VF. The PF device driver also handles the overall hardware settings and error monitoring of the IO adapter. The VF device driver handles only the settings and operation of the VF part.
US 2009/0119087 discloses a virtual device that has an emulation mode and a pass through mode. The emulation mode and the pass through mode are switched depending on the operation type. In an example given by US 2009/0119087, the emulation mode is used for an infrequent operation that does not require so high a performance level, and is switched to the pass through mode for a frequent operation that requires a high performance level.